<html>
  <head>
    <title>Google Calendar</title>
    <link rel="stylesheet" href="/stylesheets/calendar/blue/style.css">
    <style type="text/css">
      .specialDay {background-color: red; color: black;}
    </style>
    <script type='text/javascript'>
      function displaymessage(tt)
      {
        alert(tt);
      }
      function colorChangeIn(cellOb,cellText)
      {
        var tooltip="";

<%@event_ob.sort_by {|u| u.start}.each{|r|%>

  <%dateTimeStart=DateTime.parse(r.start.to_s)%>

      var cell="<%=dateTimeStart.mday%>";
      if(cell==cellText){
        tooltip=tooltip+"<font size='2'><b><%=dateTimeStart.to_s[11,5]%> : <%=r.title %></b><br> location: <%=r.where %><br> description: <%=r.content %></font><br><br>"
      }
<%}%>


    if(tooltip!="")
      ddrivetip(tooltip, 300);




<%#*cellOb.style.backgroundColor='#ffffff';%>

  }
  function colorChangeOut(cellOb)
  {

    hideddrivetip();
<%#*cellOb.style.backgroundColor='red'%>

  }

    </script>

    <style type="text/css">

                  #dhtmltooltip{
                    position: absolute;
                    left: -300px;
                    width: 150px;
                    border: 1px solid black;
                    padding: 2px;
                    background-color: lightyellow;
                    visibility: hidden;
                    z-index: 100;
                    filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
                  }

                  #dhtmlpointer{
                    position:absolute;
                    left: -300px;
                    z-index: 101;
                    visibility: hidden;
                  }

    </style>



  </head>
  <body>

    <script LANGUAGE="JavaScript" SRC="javascripts/tooltip.js"></script>


    <h1>Event Calendar</h1>
    <table border="1">
      <tr>
        <td>
          <%=calendar(:previous_month_text   => "&lt;&lt;prev",:next_month_text   =>"Next&gt;&gt;",:year => @year.to_i, :month => @month.to_i) do |d|
            if @events.include?(d)
              [d.mday, {:class => "specialDay"}]
            end
          end
        %>
        </td>
      </tr>
      <tr>

        <td>

          <%@event_ob.sort_by {|u| u.start}.each{|r|%>
            <p><font size="2">
                <%="#{Time.parse(r.start.to_s).to_s[0,16]} - #{r.title}"%>
            </font></p>

          <%}%>



        </td>

      </tr>

    </table>



  </body>
</html>